<template>
    <h1>子组件</h1>
    <h1>{{ num }}</h1>
    <button @click="emit('get-num',num)">点击传参</button>
</template>
<script setup>
    import {ref} from 'vue'
    let num = ref(10086)
    let emit = defineEmits(['get-num'])
</script>